package com.example.day23;

/**
 * @author Lenovo
 */
public class SupplierDemo {
    public static void main(String[] args) {
        String s = getString(() -> "林青霞");
        System.out.println(s);

        Integer i = getInteger(() -> 30);
        System.out.println(i);
    }
    private static Integer getInteger(Supplier<Integer> sup) {
        return sup.get();
    }
    private static String getString(Supplier<String> sup) {
        return sup.get();
    }

}
